<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>图书管理员登录页面</title>
<link rel="stylesheet" href="./public/css/managerLogin.css" />
</head>
<body>
	<div style="background-image: linear-gradient(to bottom right, rgb(114, 135, 254), rgb(130, 88, 186));height: 100%;">
		<div class="login-wrapper">
			<div class="header">Manager</div>
			<form method="post">
				<input type="text" name="user" class="input-item" placeholder="请输入账号" required="required">
				<input type="password" name="psw" class="input-item" placeholder="请输入密码" required="required">
				<input type="submit" class="btn" value="登录" onclick="javascript:void(0);">
			</form>

		</div>
	</div>
	<div style="position:fixed; top: 0; left: 0;">
		<a href="loginReader.html" target="_blank"><img src="public/image/用户.png" width="50px" height="50px"></a><br>
		<a href="adminLogin.html" target="_blank"><img src="public/image/征信指标配置.png" width="50px" height="50px"></a>
	</div>
	<script src="./public/js/layer/layer.js"></script>
	<script>
	$(function(){
		//登录	
		$("input[type=submit]").click(function(){
			
			$.ajax({
				url: "./managerLogin",
				type: "post",
				data: $("form").serialize(),
				dataType: "json",
				success: function( data ){
					if(data.code == 0){
						layer.msg("登录成功", {
							icon: 6,
							time: 1000
						}, function(){
							location.href = data.url;
						})
					}else{
						layer.open({
							title: "登录失败",
							content: data.msg,
							icon: 5,
							anim: 6
						})
					}
				}
			})
			return false;
		})
	})
	</script>
</body>
</html>